﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerChange.aspx.cs"
    Inherits="ZLDC.Estate.CM.CustomerChange" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>转介客</title>
    <base target="_self">
    </base>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery/style/jquery.hiAlerts.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery.autocomplete/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery/style/jquery.simple.tree.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing='1' bgcolor='#a8c7ce'>
        <tr>
            <td colspan="4" bgcolor="#36B4BA" >
                <strong>&nbsp;转介客</strong>
            </td>
        </tr>
        <tr bgcolor='#FFFFFF'>
            <td height='20' class='STYLE6'>
                接收人部门：
                <div id="dvDept" style="overflow: auto; z-index: 2000; position: absolute; display: none;
                    border: 1px; border-style: outset; background-color: #ffffff; height: 145px;
                    width: 200px; text-align: left;">
                    <asp:Literal ID="ltlDeptTree" runat="server"></asp:Literal>
                </div>
            </td>
            <td height='20' >
                <input id="umainclass" title='拼音首字母提示' style="width: 100px" name="umainclass" onblur="selDU()" />
                <a href="#" id="selDept" onclick="javascript:showDept('dvDept')">↓</a>
                <input id="utxtmain" runat="server" style="display: none;" />
            </td>
            <td height='20' class='STYLE6'>
                接收人：
            </td>
            <td height='20' class='STYLE6'>
                <input id="usubclass" title='拼音首字母提示,格式:姓名[工号,部门]' style="width: 100px" name="usubclass"
                    onblur="selDU()" />
                <input id="utxtsub" runat="server" style="display: none;" />
            </td>
        </tr>
        <tr bgcolor='#FFFFFF'>
            <td height='20' class='STYLE6'>
                转介人部门：
            </td>
            <td height='20' >
                <asp:TextBox ID="tbUserDept" runat="server" Width="100px" Enabled="false"></asp:TextBox>
            </td>
            <td height='20' class='STYLE6'>
                转介人：
            </td>
            <td height='20' class='STYLE6'>
                <asp:TextBox ID="tbUserName" runat="server" Width="100px" Enabled="false"></asp:TextBox>
            </td>
        </tr>
         <tr bgcolor='#FFFFFF'>
            <td height='20' class='STYLE6'>
            &nbsp;&nbsp;
                转介备注：</td>
            <td height='20'   colspan="3">
                           <textarea id="mark3" runat="server" name="mark3" rows="3"  
                    style="width: 96%; height:30px" cols="20"></textarea>
            </td>
        </tr>
        <tr bgcolor='#FFFFFF'>
            <td colspan="4" style="text-align: right;">            
                <asp:Button ID="btnOK" runat="server" Text="确定" class="button_bak" OnClientClick="return check();"
                    OnClick="imgBtnOK_Click" style="cursor: pointer;"/>                           
                <input id="btnReturn" type="button" value="返回" class="button_bak" onclick="window.close();" style="cursor: pointer;" />
                &nbsp; &nbsp;
            </td>
            
        </tr>
    </table>
    <input id="hID" type="hidden" value="" />
    </form>
</body>

<script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

<script src="../js/jquery/jquery.hiAlerts-min.js" type="text/javascript"></script>

<script src="../js/jquery.autocomplete/jquery.autocomplete.min.js" type="text/javascript"></script>

<script src="../js/jquery/jquery.simple.tree.js" type="text/javascript"></script>

<script src="../js/cm_customerchange.js" type="text/javascript"></script>

<script type="text/javascript">
    // 提交前验证
    function check() {
        var userName = $("#usubclass").val();
        if (userName == "") {
            alert("接收人不能为空！");
            return false;
        }
    }

    //部门
    $("#umainclass").autocomplete("../Ajax/GetDeptAuto.aspx", { minChars: 2, extraParams: { dpname: function() { return escape($('#umainclass').val()); } }, scrollHeight: 300, width: 200, max: 100, parse: function(data) {
        if (data == "" || data == undefined)
            return false;

        return $.map(eval(data), function(row) {
            return {
                data: row,
                value: row.id,
                result: row.name
            }
        });
    },
        formatItem: function(item) {
            return item.name;
        }

    });

    $("#umainclass").result(function(event, data, formatted) {
        // 选中下拉中某行的事件
        if (data == "" || data == undefined) {
            return false;
        }
        $("#utxtmain").val(data.id);

    });
        
</script>

</html>
